{extend name="public:_base" /}
{block name="js"}

<script type="text/javascript">
    $("[name='status']").find("[value='{$Think.get.status}']").attr("selected", true);
</script>
{/block}
{block name="main"}

<form name="" method="get" action="">
    <div class="text-c">
        <input type="text" name="title" placeholder="{:lang('title')}" style="width:250px" value="{$Think.get.title}"
               class="input-text">
        <button name="" class="btn radius btn-success" type="submit"><i class="Hui-iconfont"></i> {:lang('Search consulting')}</button>
    </div>
</form>

<div class="cl pd-5 bg-1 bk-gray mt-20">
    <span class="l">
        <a class="btn radius btn-primary radius" href="{:url(\''.\\think\\Request::instance()->controller().'/edit')}">
        <i class="Hui-iconfont">&#xe600;</i> {:lang('Add to')}</a>
    </span>

    <span style="margin-left: 5px;">
        <a class="btn radius btn-default radius" href="{:url(\''.\\think\\Request::instance()->controller().'/index',['status'=>0])}">{:lang('Pending review')}</a>
    </span>

    <span>
        <a class="btn radius btn-success radius" href="{:url(\''.\\think\\Request::instance()->controller().'/index',['status'=>1])}">{:lang('Audited')}</a>
    </span>

    <span>
        <a class="btn radius btn-danger radius" href="{:url(\''.\\think\\Request::instance()->controller().'/index',['status'=>2])}">{:lang('Fail')}</a>
    </span>

    <span class="r">
        <i class="glyphicon glyphicon-share-alt"></i>
        {:lang('Total data')}：{$num}<strong></strong>
    </span>
</div>

<div class="mt-20">
    <table class="table table-border table-bordered table-bg table-hover table-sort">
        <thead>
        <tr class="text-c">
            <th width="10">{:lang('Serial number')}</th>
            <th width="100">{:lang('title')}</th>
            <th width="100">{:lang('Create time')}</th>
            <th width="100">浏览量｜评论量</th>
            <th width="20">{:lang('status')}</th>
            <th width="40">{:lang('operating')}</th>
        </tr>
        </thead>
        <tbody>
        {volist name="list" id="vo" empty="$_html_empty"}
        <tr class="text-c va-m">
            <td>
                {$Think.get.page?(($Think.get.page-1)*$Think.config.paginate.list_rows+$i):($i)}
            </td>
            <td class="text-l">
                {notempty name="$vo.status"}
                <a href="{:url('index/bbs/detailed',['id'=>$vo.id])}" target="_blank">{$vo.title}</a>
                {else/}
                {$vo.title}
                {/notempty}
            </td>
            <td>
                {$vo.create_time}
            </td>
            <td>
                {$vo.scon}|{$vo.num}
            </td>
            <td>
                {$vo.status|show_status=$vo.id}
            </td>
            <td class="td-manage">
                <a style="text-decoration:none" class="btn radius btn-xs btn-success"
                   onClick="edit('查看评论','','10001')"
                   href="{:url(\''.\\think\\Request::instance()->controller().'/read',['id'=>$vo.id])}"
                   title="{:lang('查看评论')}">{:lang('查看评论')}</a>
                <a style="text-decoration:none" class="btn radius btn-xs btn-success"
                   onClick="edit('编辑','','10001')"
                   href="{:url(\''.\\think\\Request::instance()->controller().'/edit',['id'=>$vo.id])}"
                   title="{:lang('edit')}">{:lang('edit')}</a>
                <!--<a style="text-decoration:none" class="btn radius btn-xs btn-danger"-->
                   <!--onClick="del(this,'{:url(\''.\\think\\Request::instance()->controller().'/del',['id'=>$vo.id])}','10001')"-->
                   <!--href="{:url(\''.\\think\\Request::instance()->controller().'/del',['id'=>$vo.id])}"-->
                   <!--title="{:lang('delete')}">{:lang('delete')}</a>-->
                <a class="btn radius btn-xs btn-danger" href="javascript:;" onclick="del('{$vo.id}')" title="{:lang('delete')}">{:lang('delete')}</a>
            </td>
        </tr>
        {/volist}
        </tbody>
    </table>
</div>
{$list->render()}
{/block}